SPM: Rename SPM_DEPRECATED flag to SPM_MM
authorAntonio Nino Diaz <[email protected]>
Mon, 21 Jan 2019 11:53:29 +0000 (11:53 +0000)
committerAntonio Nino Diaz <[email protected]>
Tue, 22 Jan 2019 09:20:59 +0000 (09:20 +0000)
The SPM implementation based on MM is going to be kept for the
foreseeable future.

Change-Id: I11e96778a4f52a1aa803e7e048d9a7cb24a53954
Signed-off-by: Antonio Nino Diaz <[email protected]>
Acked-by: Sumit Garg <[email protected]>
13 files changed:
Makefile
bl31/bl31.mk
include/plat/arm/common/arm_spm_def.h
include/plat/arm/common/plat_arm.h
include/services/mm_svc.h
include/services/secure_partition.h
include/services/spm_svc.h
make_helpers/defaults.mk
plat/arm/board/fvp/fvp_common.c
plat/arm/board/fvp/include/platform_def.h
plat/arm/common/arm_common.mk
plat/socionext/synquacer/sq_bl31_setup.c
services/std_svc/std_svc_setup.c

index 02ff6d3619e7277f5e071aa387bfc7ed74edcf17..ad1ba152fd9f94707ef63cf30d33f57122ccaefa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+# Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -612,7 +612,7 @@ $(eval $(call assert_boolean,RESET_TO_BL31))
 $(eval $(call assert_boolean,SAVE_KEYS))
 $(eval $(call assert_boolean,SEPARATE_CODE_AND_RODATA))
 $(eval $(call assert_boolean,SPIN_ON_BL1_EXIT))
-$(eval $(call assert_boolean,SPM_DEPRECATED))
+$(eval $(call assert_boolean,SPM_MM))
 $(eval $(call assert_boolean,TRUSTED_BOARD_BOOT))
 $(eval $(call assert_boolean,USE_COHERENT_MEM))
 $(eval $(call assert_boolean,USE_ROMLIB))
@@ -666,7 +666,7 @@ $(eval $(call add_define,RECLAIM_INIT_CODE))
 $(eval $(call add_define,SMCCC_MAJOR_VERSION))
 $(eval $(call add_define,SPD_${SPD}))
 $(eval $(call add_define,SPIN_ON_BL1_EXIT))
-$(eval $(call add_define,SPM_DEPRECATED))
+$(eval $(call add_define,SPM_MM))
 $(eval $(call add_define,TRUSTED_BOARD_BOOT))
 $(eval $(call add_define,USE_COHERENT_MEM))
 $(eval $(call add_define,USE_ROMLIB))
index eddd164f39087d2cfd353c39e06e990e5de893fc..e6a7d18817f67faa143ac610ebd08e1baf453d9d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+# Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -8,7 +8,7 @@
 # Include SPM Makefile
 ################################################################################
 ifeq (${ENABLE_SPM},1)
-  ifeq (${SPM_DEPRECATED},1)
+  ifeq (${SPM_MM},1)
     ifeq (${EL3_EXCEPTION_HANDLING},0)
       $(error EL3_EXCEPTION_HANDLING must be 1 for SPM support)
     endif
index 997e156eea3fcf76ddc6933f488dc1c052a7095f..16c806ba6c301d6fff8dc7f87a3ef16bd752ae3e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -32,7 +32,7 @@
 #define PLAT_SPM_HEAP_BASE     (PLAT_SP_PACKAGE_BASE + PLAT_SP_PACKAGE_SIZE)
 #define PLAT_SPM_HEAP_SIZE     (BL32_LIMIT - BL32_BASE - PLAT_SP_PACKAGE_SIZE)
 
-#if SPM_DEPRECATED
+#if SPM_MM
 
 /*
  * If BL31 is placed in DRAM, place the Secure Partition in DRAM right after the
 /* Total number of memory regions with distinct properties */
 #define ARM_SP_IMAGE_NUM_MEM_REGIONS   6
 
-#endif /* SPM_DEPRECATED */
+#endif /* SPM_MM */
 
 /* Cookies passed to the Secure Partition at boot. Not used by ARM platforms. */
 #define PLAT_SPM_COOKIE_0              ULL(0)
index d1c03be688c738a0b9c1a5f04decdec6cf23f8c7..b5edc74b1e10240c4c328e373a37a2bd823bb803 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -38,7 +38,7 @@ typedef struct arm_tzc_regions_info {
  *   - Region 1 with secure access only;
  *   - the remaining DRAM regions access from the given Non-Secure masters.
  ******************************************************************************/
-#if ENABLE_SPM && SPM_DEPRECATED
+#if ENABLE_SPM && SPM_MM
 #define ARM_TZC_REGIONS_DEF                                            \
        {ARM_AP_TZC_DRAM1_BASE, ARM_EL3_TZC_DRAM1_END,                  \
                TZC_REGION_S_RDWR, 0},                                  \
index c81e9048140eea6063ce07ce9073b3728e70bb88..c11132696ca3d8eee027011a81d81091c1f7f3c7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -7,7 +7,7 @@
 #ifndef MM_SVC_H
 #define MM_SVC_H
 
-#if SPM_DEPRECATED
+#if SPM_MM
 
 #include <lib/utils_def.h>
 
@@ -30,6 +30,6 @@
 #define MM_COMMUNICATE_AARCH64         U(0xC4000041)
 #define MM_COMMUNICATE_AARCH32         U(0x84000041)
 
-#endif /* SPM_DEPRECATED */
+#endif /* SPM_MM */
 
 #endif /* MM_SVC_H */
index 47f63684f35e9e4e011deffcf95441a17d4fb13c..0510f80ece0bf4166bf5f343159216dba2ab42ca 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -7,7 +7,7 @@
 #ifndef SECURE_PARTITION_H
 #define SECURE_PARTITION_H
 
-#if SPM_DEPRECATED
+#if SPM_MM
 
 #include <stdint.h>
 
@@ -49,6 +49,6 @@ typedef struct secure_partition_boot_info {
        secure_partition_mp_info_t      *mp_info;
 } secure_partition_boot_info_t;
 
-#endif /* SPM_DEPRECATED */
+#endif /* SPM_MM */
 
 #endif /* SECURE_PARTITION_H */
index fcb409b293d35a85f710919d5fd9591f1684ff74..57912e883488bb73c94e7a3a03d047d17aabec65 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -7,7 +7,7 @@
 #ifndef SPM_SVC_H
 #define SPM_SVC_H
 
-#if SPM_DEPRECATED
+#if SPM_MM
 
 #include <lib/utils_def.h>
 
@@ -61,7 +61,7 @@
 #define SPM_DENIED             -3
 #define SPM_NO_MEMORY          -5
 
-#endif /* SPM_DEPRECATED */
+#endif /* SPM_MM */
 
 #ifndef __ASSEMBLY__
 
@@ -69,7 +69,7 @@
 
 int32_t spm_setup(void);
 
-#if SPM_DEPRECATED
+#if SPM_MM
 
 uint64_t spm_smc_handler(uint32_t smc_fid,
                         uint64_t x1,
@@ -83,7 +83,7 @@ uint64_t spm_smc_handler(uint32_t smc_fid,
 /* Helper to enter a Secure Partition */
 uint64_t spm_sp_call(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3);
 
-#endif /* SPM_DEPRECATED */
+#endif /* SPM_MM */
 
 #endif /* __ASSEMBLY__ */
 
index a55e729b84659171a4d9993799d48101044097bb..8ef1bb9f8892e6319eba8638c732a453ce77f74e 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
+# Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -162,8 +162,8 @@ SPD                         := none
 # For including the Secure Partition Manager
 ENABLE_SPM                     := 0
 
-# Use the deprecated SPM based on MM
-SPM_DEPRECATED                 := 1
+# Use the SPM based on MM
+SPM_MM                         := 1
 
 # Flag to introduce an infinite loop in BL1 just before it exits into the next
 # image. This is meant to help debugging the post-BL2 phase.
index 4da807a4c725cb27f7d2026a02cdc9e2113af9d5..fdf82f493f0075a6519e870119ed1f476bf21bc4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -95,10 +95,10 @@ const mmap_region_t plat_arm_mmap[] = {
        ARM_MAP_BL1_RW,
 #endif
 #endif /* TRUSTED_BOARD_BOOT */
-#if ENABLE_SPM && SPM_DEPRECATED
+#if ENABLE_SPM && SPM_MM
        ARM_SP_IMAGE_MMAP,
 #endif
-#if ENABLE_SPM && !SPM_DEPRECATED
+#if ENABLE_SPM && !SPM_MM
        PLAT_MAP_SP_PACKAGE_MEM_RW,
 #endif
 #if ARM_BL31_IN_DRAM
@@ -126,16 +126,16 @@ const mmap_region_t plat_arm_mmap[] = {
        MAP_DEVICE0,
        MAP_DEVICE1,
        ARM_V2M_MAP_MEM_PROTECT,
-#if ENABLE_SPM && SPM_DEPRECATED
+#if ENABLE_SPM && SPM_MM
        ARM_SPM_BUF_EL3_MMAP,
 #endif
-#if ENABLE_SPM && !SPM_DEPRECATED
+#if ENABLE_SPM && !SPM_MM
        PLAT_MAP_SP_PACKAGE_MEM_RO,
 #endif
        {0}
 };
 
-#if ENABLE_SPM && defined(IMAGE_BL31) && SPM_DEPRECATED
+#if ENABLE_SPM && defined(IMAGE_BL31) && SPM_MM
 const mmap_region_t plat_arm_secure_partition_mmap[] = {
        V2M_MAP_IOFPGA_EL0, /* for the UART */
        MAP_REGION_FLAT(DEVICE0_BASE,                           \
@@ -189,7 +189,7 @@ static unsigned int get_interconnect_master(void)
 }
 #endif
 
-#if ENABLE_SPM && defined(IMAGE_BL31) && SPM_DEPRECATED
+#if ENABLE_SPM && defined(IMAGE_BL31) && SPM_MM
 /*
  * Boot information passed to a secure partition during initialisation. Linear
  * indices in MP information will be filled at runtime.
index 31f06a9881b2239a9a7378c10efca8028a3ad043..8c0daf130eb48b8d6ee1c8662ab0dfcbc4464e56 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2014-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -13,7 +13,7 @@
 #  define PLAT_XLAT_TABLES_DYNAMIC     1
 # endif
 #else
-# if defined(IMAGE_BL31) && (RESET_TO_BL31 || (ENABLE_SPM && !SPM_DEPRECATED))
+# if defined(IMAGE_BL31) && (RESET_TO_BL31 || (ENABLE_SPM && !SPM_MM))
 #  define PLAT_XLAT_TABLES_DYNAMIC     1
 # endif
 #endif /* AARCH32 */
  * calculated using the current BL31 PROGBITS debug size plus the sizes of
  * BL2 and BL1-RW
  */
-#if ENABLE_SPM && !SPM_DEPRECATED
+#if ENABLE_SPM && !SPM_MM
 #define PLAT_ARM_MAX_BL31_SIZE         UL(0x60000)
 #else
 #define PLAT_ARM_MAX_BL31_SIZE         UL(0x3B000)
index a8ac286f753232e3e32632bc7447a8a6eb3a5f06..9ad7bd7231fb82721ebeba1b689eadc17288770d 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
+# Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -240,7 +240,7 @@ BL31_SOURCES                +=      lib/extensions/ras/std_err_record.c             \
 endif
 
 # SPM uses libfdt in Arm platforms
-ifeq (${SPM_DEPRECATED},0)
+ifeq (${SPM_MM},0)
 ifeq (${ENABLE_SPM},1)
 BL31_SOURCES           +=      common/fdt_wrappers.c                   \
                                plat/common/plat_spm_rd.c               \
index 2fac80ff00ea761547b92093736bcb1160272ed3..fef84efd7d8238d644466aaf812ad2bbe1092faf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -160,7 +160,7 @@ void bl31_plat_runtime_setup(void)
 void bl31_plat_arch_setup(void)
 {
        static const mmap_region_t secure_partition_mmap[] = {
-#if ENABLE_SPM && SPM_DEPRECATED
+#if ENABLE_SPM && SPM_MM
                MAP_REGION_FLAT(PLAT_SPM_BUF_BASE,
                                PLAT_SPM_BUF_SIZE,
                                MT_RW_DATA | MT_SECURE),
@@ -174,7 +174,7 @@ void bl31_plat_arch_setup(void)
        sq_mmap_setup(BL31_BASE, BL31_SIZE, secure_partition_mmap);
        enable_mmu_el3(XLAT_TABLE_NC);
 
-#if ENABLE_SPM && SPM_DEPRECATED
+#if ENABLE_SPM && SPM_MM
        memcpy((void *)SPM_SHIM_EXCEPTIONS_START,
               (void *)SPM_SHIM_EXCEPTIONS_LMA,
               (uintptr_t)SPM_SHIM_EXCEPTIONS_END -
index 7a34655fd78d8ac2d53082adfef5e421b506b755..1d80fa343356eea0bce9c4b4f07549f62cea9898 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2014-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -103,7 +103,7 @@ static uintptr_t std_svc_smc_handler(uint32_t smc_fid,
                SMC_RET1(handle, ret);
        }
 
-#if ENABLE_SPM && SPM_DEPRECATED
+#if ENABLE_SPM && SPM_MM
        /*
         * Dispatch SPM calls to SPM SMC handler and return its return
         * value